package com.csc.trobbins4.svn;

public class Account {
	
	private double balance;
	private String acctNum;
	private char type;
	
	public Account(){
		acctNum = "";
		balance = 0;
		setType('C');
	}

	//Constructors
	public Account(String acctNum){
		this.acctNum = acctNum;
		balance = 0; //change this to connect to the db to get actual balance
		setType('C');
	}
	
	public Account(String acctNum, double balance){
		this.acctNum = acctNum;
		this.balance = balance;
		setType('C');
	}
	
	public Account(String acctNum, double balance, char type){
		this.acctNum = acctNum;
		this.balance = balance;
		this.setType(type);
	}
	
	//methods
	public void withdraw(double amount){
		//Add security checks here
		balance-=amount;
	}
	
	public void deposit(double amount){
		balance+=amount;
		
	}
	
	//getter and setter methods for all fields
	public void setAcctNum(String acctNum) {
		this.acctNum = acctNum;
	}

	public String getAcctNum() {
		return acctNum;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	public double getBalance() {
		return balance;
	}

	public void setType(char type) {
		this.type = type;
	}

	public char getType() {
		return type;
	}
}
